//
//  GNRPickCardActionView.m
//  FBSnapshotTestCase
//
//  Created by LvYuan on 2017/10/31.
//

#import "GNRPickCardActionView.h"
#import <GNRCoreKit/GNRCoreKitHeader.h>
@implementation GNRPickCardActionView

- (void)awakeFromNib{
    [super awakeFromNib];
    [_confirmBtn setBackgroundImage:[UIImage imageWithColor:[UIColor colorWithHexString:@"#1a1a1a"] size:CGSizeMake(2, 2)] forState:UIControlStateNormal];
    [_confirmBtn setBackgroundImage:[UIImage imageWithColor:[UIColor colorWithHexString:@"#e6e6e6"] size:CGSizeMake(2, 2)] forState:UIControlStateDisabled];
    _confirmBtn.enabled = NO;
    _confirmBtn.layer.cornerRadius = 4;
    _confirmBtn.layer.masksToBounds = YES;
    
}

- (void)setConfirmBlock:(void (^)(UIButton *))confirmBlock{
    _confirmBlock = nil;
    _confirmBlock = [confirmBlock copy];
}

- (IBAction)confirmBtnPressed:(id)sender {
    if (_confirmBlock) {
        _confirmBlock(sender);
    }
}

@end
